home *** CD-ROM | disk | FTP | other *** search
- Newsgroups: comp.sys.amiga.programmer
- Path: chang.unx.sas.com!walker
- From: walker@chang.unx.sas.com (Doug Walker)
- Subject: Re: Feeling very confused with SAS/C, NDK 3.1, etc.
- Sender: news@unx.sas.com (Noter of Newsworthy Events)
- Message-ID: <Dovn40.34H@unx.sas.com>
- Date: Tue, 26 Mar 1996 13:36:00 GMT
- X-Nntp-Posting-Host: chang.unx.sas.com
- References: <1777.6656T1015T1276@mistral.co.uk> <DotxBJ.HqE@unx.sas.com> <3224.6658T1353T50@mistral.co.uk>
- Organization: SAS Institute Inc.
-
- In article <3224.6658T1353T50@mistral.co.uk>,
- Adam Atkinson <ghira@mistral.co.uk> wrote:
- >I expressed myself poorly. I should have said "is it worth replacing the
- >commodore-supplied files in SAS C 5.56 with later versions from NDK 3.1,
- >where these exist?" Actually, I haven't been able to find any concrete
- >cases of this, so the point is moot. I suspect the answer would be "yes",
- >though.
-
- This should be OK to do. The worst that will happen is that you will not
- have #pragma statements for some of the system routines if they were
- added after our last release of the headers. Since system header files
- are backwards compatible, you shouldn't have any problems other than
- that.
-
- >Are .fd files something I need? I remember workbench 1.3 had them and
- >NDK3.1 has lots. I don't currently have any idea what they're for.
-
- You can use the .fd files to generate #pragma statements for shared
- libraries by using the FD2PRAGMA utility provided with SAS/C. Check
- the Library Reference Manual for details.
-
- >Yes. I've tried reading it and had no idea what was going on. I imagine I
- >will eventually realise GSTs are dead useful, but I suppose I'll come to
- >that later.
-
- Basically, when you create a GST the compiler parses the .h files and adds
- the symbols to its symbol table. It then dumps the contents of the symbol
- table to disk. When you want to use the GST, it is loaded from disk. Not
- only is this much faster than recompiling all those headers, it can
- remain in memory between compiles once it's created. Using a GST can cut
- compile time by a minute or more PER C SOURCE FILE, depending on how many
- include files you use and how fast your machine is.
-
- Try it yourself: create a file that just does a #include of <intuition.h>,
- which is huge by itself and also includes a lot of other files. Compile
- with NOGST (the default) and time it. Then do it again but specify
- GST=<the system provided GST file>. Compile time will drop to a couple of
- seconds. If you immediately repeat the same compile, compile time is
- virtually zero because the GST is still loaded from the last time.
-
- If you just use the system provided GST file, you will get the speedup for
- system include files only. If you create your own GST file for each project,
- you can get the speedup for your own header files and for your MUI and
- other add-on headers as well, but each time you change one of your .h files
- you'll need to rebuild the GST. It's a tradeoff.
-
- --
- *****
- *|_o_o|\\ Doug Walker walker@unx.sas.com
- *|. o.| ||
- | o |// Any opinions are mine, not those of SAS Institute, Inc.
- ======
-